<template>
  <div class="HelloVue">
    <p>这是协作中心</p>

    <h1 v-if="flag">Vue is awesome!</h1>
    <h1>{{greetingMessage}}</h1>

    <li v-for="item in items" v-bind:key="item.index" >
      {{ parentMessage }} - {{ index }} - {{ item.message }}
    </li>
  </div>
</template>

<script>

export default {
  name: 'ArticleCom',
  props: {
    greetingMessage: String
  },
  data() {
    return {
      flag: false,
      parentMessage: 'Parent',
      items: [{ message: 'Fo222o' }, { message: 'Bar' }]
    }
  },
  methods: {
    
  },
  
  mounted() {

    console.log(`the component is now mounted.`)
  },
  created() {

    console.log(`the component is now created.`)
  },
  beforeCreate() {
    console.log(`the component is now beforeCreate.`)
  },
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
h3 {
  margin: 40px 0 0;
}
ul {
  list-style-type: none;
  padding: 0;
}
li {
  display: inline-block;
  margin: 0 10px;
}
a {
  color: #42b983;
}
.submit{
  width:100px;
  height:30px;
  background-color:red;
}
</style>
